Input
This is how to make objects that users can use. The Tag The tag allows users to interact with things, such as buttons, checkboxes, and text fields. It is commonly used like this: Instead of a blank space in the type selector (type=" "), we put a form of interaction. Possible words to put in the type selector are: Button Checkbox File Hidden Image Password Radio Reset Submit Text If I do not list how a type works, it is because I have absolutely no idea what it does Button The Button input type is pretty self-explanatory. It creates a button that users can click. The tag using a button is this: The button would have no text on it, and do nothing on being clicked. To get a name for it, you use the word value=" ". 'If I wanted to make a button that says "Click Me!", I would do: To make the button do something on being clicked, put it in a Link, or use a Javascript function. To find out how to do that, visit the Javascript page once I make it. Checkbox The Checkbox input type is very simple. Unlike the Button, the checkbox needs no value because it does not have a name. ' '''If I wanted to make a Checkbox, I would do: I currently do not know how to get it to do anything except check itself, but it is exciting when you have a page full of them as you can make a cool "checkbox painting". Password Password works exactly like the '''text type, except that the letters are shown as *. If I wanted to make a Password, I would do: I reccomend reading about the text '''type. Radio No, it is not that type of radio! A radio button is one of those circular buttons that you can check, but unlike checkboxes, they cannot be unchecked. If you put them in a '''form, though, they will uncheck when you click a different one. If I wanted to make a Radio, I would do: Please check out the form page. Text If I wanted to make a box where someone could type, I would use a text type of input. Text input can be very fun to use, with lots of editors like maxlength to determine how long the word can be, and size to determine how long the box will be in terms of letters. If I wanted to make a simple textbox with no features, I would do: If I wanted to have text already generated in the text box, I would use value, like with the button. If a user accidentally messes up and puts an extra letter in the box, it could mess up the point of the page by ruining some script (not internal script, just the script in the currently loaded page). To prevent this, use the maxlength '''editor. '''Maxlenght determines the amount of characters allowed in the textbox. If i wanted to do this, I would do: This code would make a message box that starts with the word "lol" and can only hold 5 letters or numbers.